// Upgrade NOTE: commented out 'float4 unity_DynamicLightmapST', a built-in variable
// Upgrade NOTE: commented out 'float4 unity_LightmapST', a built-in variable
// Upgrade NOTE: commented out 'float4 unity_ShadowFadeCenterAndType', a built-in variable
// Upgrade NOTE: replaced '_World2Object' with 'unity_WorldToObject'
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
// Upgrade NOTE: replaced 'unity_World2Shadow' with 'unity_WorldToShadow'

Shader "Hidden/TerrainEngine/Splatmap/Standard-Base" {
Properties {
 _MainTex ("Base (RGB) Smoothness (A)", 2D) = "white" { }
 _MetallicTex ("Metallic (R)", 2D) = "white" { }
 _Color ("Main Color", Color) = (1,1,1,1)
}
SubShader { 
 LOD 200
 Tags { "QUEUE"="Geometry-100" "RenderType"="Opaque" }
 Pass {
  Name "FORWARD"
  Tags { "LIGHTMODE"="ForwardBase" "QUEUE"="Geometry-100" "SHADOWSUPPORT"="true" "RenderType"="Opaque" }
  GpuProgramID 45827
CGPROGRAM
//#pragma target 4.0

#pragma vertex vert
#pragma fragment frag

#include "UnityCG.cginc"
#define conv_mxt4x4_0(mat4x4) float4(mat4x4[0].x,mat4x4[1].x,mat4x4[2].x,mat4x4[3].x)
#define conv_mxt4x4_1(mat4x4) float4(mat4x4[0].y,mat4x4[1].y,mat4x4[2].y,mat4x4[3].y)
#define conv_mxt4x4_2(mat4x4) float4(mat4x4[0].z,mat4x4[1].z,mat4x4[2].z,mat4x4[3].z)
#define conv_mxt4x4_3(mat4x4) float4(mat4x4[0].w,mat4x4[1].w,mat4x4[2].w,mat4x4[3].w)


#define CODE_BLOCK_VERTEX
//uniform float4 _Time;
//uniform float4 _SinTime;
//uniform float4 _CosTime;
//uniform float4 unity_DeltaTime;
//uniform float3 _WorldSpaceCameraPos;
//uniform float4 _ProjectionParams;
//uniform float4 _ScreenParams;
//uniform float4 _ZBufferParams;
//uniform float4 unity_OrthoParams;
//uniform float4 unity_CameraWorldClipPlanes[6];
//uniform mat4x4 unity_CameraProjection;
//uniform mat4x4 unity_CameraInvProjection;
//uniform float4 _WorldSpaceLightPos0;
//uniform float4 _LightPositionRange;
//uniform float4 unity_4LightPosX0;
//uniform float4 unity_4LightPosY0;
//uniform float4 unity_4LightPosZ0;
//uniform float4 unity_4LightAtten0;
//uniform float4 unity_LightColor[8];
//uniform float4 unity_LightPosition[8];
//uniform float4 unity_LightAtten[8];
//uniform float4 unity_SpotDirection[8];
//uniform float4 unity_SHAr;
//uniform float4 unity_SHAg;
//uniform float4 unity_SHAb;
//uniform float4 unity_SHBr;
//uniform float4 unity_SHBg;
//uniform float4 unity_SHBb;
//uniform float4 unity_SHC;
uniform float3 unity_LightColor0;
uniform float3 unity_LightColor1;
uniform float3 unity_LightColor2;
uniform float3 unity_LightColor3;
uniform float4x4 unity_ShadowSplitSpheres;
uniform float4 unity_ShadowSplitSqRadii;
//uniform float4 unity_LightShadowBias;
//uniform float4 _LightSplitsNear;
//uniform float4 _LightSplitsFar;
uniform mat4x4x4 unity_WorldToShadow;
//uniform float4 _LightShadowData;
// uniform float4 unity_ShadowFadeCenterAndType;
//uniform mat4x4 UNITY_MATRIX_MVP;
//uniform mat4x4 UNITY_MATRIX_MV;
//uniform mat4x4 UNITY_MATRIX_IT_MV;
//uniform mat4x4 unity_ObjectToWorld;
uniform mat4x4 unity_WorldToObject;
//uniform float4 unity_LODFade;
//uniform float4 unity_WorldTransformParams;
//uniform mat4x4 glstate_matrix_transpose_modelview0;
//uniform mat4x4 UNITY_MATRIX_P;
//uniform float4 glstate_lightmodel_ambient;
//uniform mat4x4 unity_MatrixV;
//uniform mat4x4 unity_MatrixVP;
//uniform float4 unity_AmbientSky;
//uniform float4 unity_AmbientEquator;
//uniform float4 unity_AmbientGround;
//uniform float4 unity_FogColor;
//uniform float4 unity_FogParams;
// uniform float4 unity_LightmapST;
// uniform float4 unity_DynamicLightmapST;
//uniform float4 unity_SpecCube0_BoxMax;
//uniform float4 unity_SpecCube0_BoxMin;
//uniform float4 unity_SpecCube0_ProbePosition;
//uniform float4 unity_SpecCube0_HDR;
//uniform float4 unity_SpecCube1_BoxMax;
//uniform float4 unity_SpecCube1_BoxMin;
//uniform float4 unity_SpecCube1_ProbePosition;
//uniform float4 unity_SpecCube1_HDR;
uniform float4 unity_ColorSpaceGrey;
//uniform float4 unity_ColorSpaceDouble;
uniform float4 unity_ColorSpaceDielectricSpec;
uniform float4 unity_ColorSpaceLuminance;
//uniform float4 unity_Lightmap_HDR;
uniform float4 unity_DynamicLightmap_HDR;
uniform float4 _LightColor0;
uniform float4 _SpecColor;
uniform float4 _MainTex_ST;
uniform sampler2D _MainTex;
uniform sampler2D _MetallicTex;
//uniform samplerCUBE unity_SpecCube0;
struct appdata_t
{
    float4 vertex :POSITION0;
    float3 normal :NORMAL0;
    float4 texcoord :TEXCOORD0;
};

struct OUT_Data_Vert
{
    float2 texcoord :TEXCOORD0;
    float3 texcoord1 :TEXCOORD1;
    float3 texcoord2 :TEXCOORD2;
    float3 texcoord3 :TEXCOORD3;
    float4 texcoord6 :TEXCOORD6;
    float4 vertex :SV_POSITION;
};

struct v2f
{
    float2 texcoord :TEXCOORD0;
    float3 texcoord1 :TEXCOORD1;
    float3 texcoord2 :TEXCOORD2;
    float3 texcoord3 :TEXCOORD3;
};

struct OUT_Data_Frag
{
    float4 color :SV_Target0;
};

float4 t0;
float4 t16_0;
float3 t1;
float t16_2;
float3 t16_3;
float t12;
OUT_Data_Vert vert(appdata_t in_v)
{
    OUT_Data_Vert out_v;
    out_v.vertex = UnityObjectToClipPos(in_v.vertex);
    out_v.texcoord.xy = TRANSFORM_TEX(in_v.texcoord.xy, _MainTex);
    t0.x = (in_v.normal.x * conv_mxt4x4_0(unity_WorldToObject).x);
    t0.y = (in_v.normal.x * conv_mxt4x4_1(unity_WorldToObject).x);
    t0.z = (in_v.normal.x * conv_mxt4x4_2(unity_WorldToObject).x);
    t1.x = (in_v.normal.y * conv_mxt4x4_0(unity_WorldToObject).y);
    t1.y = (in_v.normal.y * conv_mxt4x4_1(unity_WorldToObject).y);
    t1.z = (in_v.normal.y * conv_mxt4x4_2(unity_WorldToObject).y);
    t0.xyz = (t0.xyz + t1.xyz);
    t1.x = (in_v.normal.z * conv_mxt4x4_0(unity_WorldToObject).z);
    t1.y = (in_v.normal.z * conv_mxt4x4_1(unity_WorldToObject).z);
    t1.z = (in_v.normal.z * conv_mxt4x4_2(unity_WorldToObject).z);
    t0.xyz = (t0.xyz + t1.xyz);
    t0.xyz = normalize(t0.xyz);
    out_v.texcoord1.xyz = t0.xyz;
    t1.xyz = (in_v.vertex.yyy * conv_mxt4x4_1(unity_ObjectToWorld).xyz);
    t1.xyz = ((conv_mxt4x4_0(unity_ObjectToWorld).xyz * in_v.vertex.xxx) + t1.xyz);
    t1.xyz = ((conv_mxt4x4_2(unity_ObjectToWorld).xyz * in_v.vertex.zzz) + t1.xyz);
    out_v.texcoord2.xyz = ((conv_mxt4x4_3(unity_ObjectToWorld).xyz * in_v.vertex.www) + t1.xyz);
    t16_2 = (t0.y * t0.y);
    t16_2 = ((t0.x * t0.x) + (-t16_2));
    t16_0 = (t0.yzzx * t0.xyzz);
    t16_3.x = dot(unity_SHBr, t16_0);
    t16_3.y = dot(unity_SHBg, t16_0);
    t16_3.z = dot(unity_SHBb, t16_0);
    out_v.texcoord3.xyz = ((unity_SHC.xyz * float3(t16_2, t16_2, t16_2)) + t16_3.xyz);
    out_v.texcoord6 = float4(0, 0, 0, 0);
    return out_v;
}

#define CODE_BLOCK_FRAGMENT
float3 t0_d;
float4 t10_0;
float4 t16_1;
float4 t16_2_d;
float4 t10_2;
float3 t16_3_d;
float3 t16_4;
float3 t16_5;
float3 t16_6;
float3 t16_7;
float t16_9;
float t24;
float t16_24;
float t10_24;
float t16_25;
float t16_28;
OUT_Data_Frag frag(v2f in_f)
{
    OUT_Data_Frag out_f;
    t0_d.xyz = ((-in_f.texcoord2.xyz) + _WorldSpaceCameraPos.xyz);
    t24 = dot(t0_d.xyz, t0_d.xyz);
    t24 = rsqrt(t24);
    t16_1.xyz = ((t0_d.xyz * float3(t24, t24, t24)) + _WorldSpaceLightPos0.xyz);
    t0_d.xyz = (float3(t24, t24, t24) * t0_d.xyz);
    t16_25 = dot(t16_1.xyz, t16_1.xyz);
    t16_24 = max(t16_25, 0.00100000005);
    t16_25 = rsqrt(t16_24);
    t16_1.xyz = (float3(t16_25, t16_25, t16_25) * t16_1.xyz);
    t10_2.x = dot(in_f.texcoord1.xyz, in_f.texcoord1.xyz);
    t10_2.x = rsqrt(t10_2.x);
    t10_2.xyz = (t10_2.xxx * in_f.texcoord1.xyz);
    t16_25 = dot(t10_2.xyz, t16_1.xyz);
    t16_1.x = dot(_WorldSpaceLightPos0.xyz, t16_1.xyz);
    t16_24 = max(t16_1.x, 0);
    t16_1.x = dot(t10_2.xyz, t0_d.xyz);
    t16_3_d.x = max(t16_1.x, 0);
    t16_1.x = ((-t16_3_d.x) + 1);
    t16_1.x = (t16_1.x * t16_1.x);
    t16_3_d.x = max(t16_25, 0);
    t16_9 = log2(t16_3_d.x);
    t10_2 = tex2D(_MainTex, in_f.texcoord.xy);
    t16_1.z = ((-t10_2.w) + 1);
    t16_1.xw = (t16_1.xz * t16_1.xz);
    t16_3_d.x = max(t16_1.w, 9.99999975E-05);
    t16_4.x = (t16_3_d.x * t16_3_d.x);
    t16_4.x = (2 / t16_4.x);
    t16_4.x = (t16_4.x + (-2));
    t16_3_d.x = max(t16_4.x, 9.99999975E-05);
    t16_9 = (t16_9 * t16_3_d.x);
    t16_4.x = (t16_3_d.x + 1);
    t16_9 = exp2(t16_9);
    t16_9 = (t16_9 * t16_4.x);
    t16_4.x = (t16_24 * t16_24);
    t16_4.x = ((t16_4.x * t10_2.w) + t16_1.w);
    t16_25 = (t16_1.z * t16_1.w);
    t16_25 = (((-t16_25) * 0.280000001) + 1);
    t16_4.x = (t16_4.x * 8);
    t16_24 = ((t16_4.x * t16_24) + 9.99999975E-05);
    t16_24 = (t16_9 / t16_24);
    t16_24 = max(t16_24, 9.99999975E-05);
    t16_24 = sqrt(t16_24);
    t16_9 = min(t16_24, 100);
    t16_4.xyz = (t10_2.xyz + (-unity_ColorSpaceDielectricSpec.xyz));
    t10_24 = tex2D(_MetallicTex, in_f.texcoord.xy).x;
    t16_4.xyz = ((float3(t10_24, t10_24, t10_24) * t16_4.xyz) + unity_ColorSpaceDielectricSpec.xyz);
    t16_28 = (((-t10_24) * unity_ColorSpaceDielectricSpec.w) + unity_ColorSpaceDielectricSpec.w);
    t16_5.xyz = (t10_2.xyz * float3(t16_28, t16_28, t16_28));
    t16_28 = ((-t16_28) + 1);
    t16_28 = (t10_2.w + t16_28);
    t16_28 = clamp(t16_28, 0, 1);
    t16_6.xyz = ((-t16_4.xyz) + float3(t16_28, t16_28, t16_28));
    t16_6.xyz = ((t16_1.xxx * t16_6.xyz) + t16_4.xyz);
    t16_4.xyz = ((float3(t16_9, t16_9, t16_9) * t16_4.xyz) + t16_5.xyz);
    t16_4.xyz = (t16_4.xyz * _LightColor0.xyz);
    t16_1.x = dot(in_f.texcoord1.xyz, _WorldSpaceLightPos0.xyz);
    t16_24 = max(t16_1.x, 0);
    t16_2_d.xyz = in_f.texcoord1.xyz;
    t16_2_d.w = 1;
    t16_7.x = dot(unity_SHAr, t16_2_d);
    t16_7.y = dot(unity_SHAg, t16_2_d);
    t16_7.z = dot(unity_SHAb, t16_2_d);
    t16_7.xyz = (t16_7.xyz + in_f.texcoord3.xyz);
    t16_7.xyz = max(t16_7.xyz, float3(0, 0, 0));
    t16_3_d.xyz = log2(t16_7.xyz);
    t16_3_d.xyz = (t16_3_d.xyz * float3(0.416666657, 0.416666657, 0.416666657));
    t16_3_d.xyz = exp2(t16_3_d.xyz);
    t16_3_d.xyz = ((t16_3_d.xyz * float3(1.05499995, 1.05499995, 1.05499995)) + float3(-0.0549999997, (-0.0549999997), (-0.0549999997)));
    t16_3_d.xyz = max(t16_3_d.xyz, float3(0, 0, 0));
    t16_5.xyz = (t16_5.xyz * t16_3_d.xyz);
    t16_4.xyz = ((t16_4.xyz * float3(t16_24, t16_24, t16_24)) + t16_5.xyz);
    t16_1.x = (((-t16_1.z) * 0.699999988) + 1.70000005);
    t16_1.x = (t16_1.x * t16_1.z);
    t16_1.x = (t16_1.x * 6);
    t16_9 = dot((-t0_d.xyz), in_f.texcoord1.xyz);
    t16_9 = (t16_9 + t16_9);
    t16_5.xyz = ((in_f.texcoord1.xyz * (-float3(t16_9, t16_9, t16_9))) + (-t0_d.xyz));
    t10_0 = UNITY_SAMPLE_TEXCUBE(unity_SpecCube0, float4(t16_5.xyz, t16_1.x));
    t16_1.x = (t10_0.w * unity_SpecCube0_HDR.x);
    t16_1.xyz = (t10_0.xyz * t16_1.xxx);
    t16_1.xyz = (t16_1.xyz * float3(t16_25, t16_25, t16_25));
    t16_1.xyz = ((t16_1.xyz * t16_6.xyz) + t16_4.xyz);
    out_f.color.xyz = t16_1.xyz;
    out_f.color.w = 1;
    return out_f;
}


ENDCG

}
 Pass {
  Name "FORWARD"
  Tags { "LIGHTMODE"="ForwardAdd" "QUEUE"="Geometry-100" "SHADOWSUPPORT"="true" "RenderType"="Opaque" }
  ZWrite Off
  Blend One One
  GpuProgramID 128984
CGPROGRAM
//#pragma target 4.0

#pragma vertex vert
#pragma fragment frag

#include "UnityCG.cginc"
#define conv_mxt4x4_0(mat4x4) float4(mat4x4[0].x,mat4x4[1].x,mat4x4[2].x,mat4x4[3].x)
#define conv_mxt4x4_1(mat4x4) float4(mat4x4[0].y,mat4x4[1].y,mat4x4[2].y,mat4x4[3].y)
#define conv_mxt4x4_2(mat4x4) float4(mat4x4[0].z,mat4x4[1].z,mat4x4[2].z,mat4x4[3].z)
#define conv_mxt4x4_3(mat4x4) float4(mat4x4[0].w,mat4x4[1].w,mat4x4[2].w,mat4x4[3].w)


#define CODE_BLOCK_VERTEX
//uniform float4 _Time;
//uniform float4 _SinTime;
//uniform float4 _CosTime;
//uniform float4 unity_DeltaTime;
//uniform float3 _WorldSpaceCameraPos;
//uniform float4 _ProjectionParams;
//uniform float4 _ScreenParams;
//uniform float4 _ZBufferParams;
//uniform float4 unity_OrthoParams;
//uniform float4 unity_CameraWorldClipPlanes[6];
//uniform mat4x4 unity_CameraProjection;
//uniform mat4x4 unity_CameraInvProjection;
//uniform float4 _WorldSpaceLightPos0;
//uniform float4 _LightPositionRange;
//uniform float4 unity_4LightPosX0;
//uniform float4 unity_4LightPosY0;
//uniform float4 unity_4LightPosZ0;
//uniform float4 unity_4LightAtten0;
//uniform float4 unity_LightColor[8];
//uniform float4 unity_LightPosition[8];
//uniform float4 unity_LightAtten[8];
//uniform float4 unity_SpotDirection[8];
//uniform float4 unity_SHAr;
//uniform float4 unity_SHAg;
//uniform float4 unity_SHAb;
//uniform float4 unity_SHBr;
//uniform float4 unity_SHBg;
//uniform float4 unity_SHBb;
//uniform float4 unity_SHC;
uniform float3 unity_LightColor0;
uniform float3 unity_LightColor1;
uniform float3 unity_LightColor2;
uniform float3 unity_LightColor3;
uniform float4x4 unity_ShadowSplitSpheres;
uniform float4 unity_ShadowSplitSqRadii;
//uniform float4 unity_LightShadowBias;
//uniform float4 _LightSplitsNear;
//uniform float4 _LightSplitsFar;
uniform mat4x4x4 unity_WorldToShadow;
//uniform float4 _LightShadowData;
// uniform float4 unity_ShadowFadeCenterAndType;
//uniform mat4x4 UNITY_MATRIX_MVP;
//uniform mat4x4 UNITY_MATRIX_MV;
//uniform mat4x4 UNITY_MATRIX_IT_MV;
//uniform mat4x4 unity_ObjectToWorld;
uniform mat4x4 unity_WorldToObject;
//uniform float4 unity_LODFade;
//uniform float4 unity_WorldTransformParams;
//uniform mat4x4 glstate_matrix_transpose_modelview0;
//uniform mat4x4 UNITY_MATRIX_P;
//uniform float4 glstate_lightmodel_ambient;
//uniform mat4x4 unity_MatrixV;
//uniform mat4x4 unity_MatrixVP;
//uniform float4 unity_AmbientSky;
//uniform float4 unity_AmbientEquator;
//uniform float4 unity_AmbientGround;
//uniform float4 unity_FogColor;
//uniform float4 unity_FogParams;
// uniform float4 unity_LightmapST;
// uniform float4 unity_DynamicLightmapST;
//uniform float4 unity_SpecCube0_BoxMax;
//uniform float4 unity_SpecCube0_BoxMin;
//uniform float4 unity_SpecCube0_ProbePosition;
//uniform float4 unity_SpecCube0_HDR;
//uniform float4 unity_SpecCube1_BoxMax;
//uniform float4 unity_SpecCube1_BoxMin;
//uniform float4 unity_SpecCube1_ProbePosition;
//uniform float4 unity_SpecCube1_HDR;
uniform float4 unity_ColorSpaceGrey;
//uniform float4 unity_ColorSpaceDouble;
uniform float4 unity_ColorSpaceDielectricSpec;
uniform float4 unity_ColorSpaceLuminance;
//uniform float4 unity_Lightmap_HDR;
uniform float4 unity_DynamicLightmap_HDR;
uniform float4 _LightColor0;
uniform float4 _SpecColor;
uniform mat4x4 unity_WorldToLight;
uniform float4 _MainTex_ST;
uniform sampler2D _MainTex;
uniform sampler2D _MetallicTex;
uniform sampler2D _LightTexture0;
struct appdata_t
{
    float4 vertex :POSITION0;
    float3 normal :NORMAL0;
    float4 texcoord :TEXCOORD0;
};

struct OUT_Data_Vert
{
    float2 texcoord :TEXCOORD0;
    float3 texcoord1 :TEXCOORD1;
    float3 texcoord2 :TEXCOORD2;
    float4 vertex :SV_POSITION;
};

struct v2f
{
    float2 texcoord :TEXCOORD0;
    float3 texcoord1 :TEXCOORD1;
    float3 texcoord2 :TEXCOORD2;
};

struct OUT_Data_Frag
{
    float4 color :SV_Target0;
};

float4 t0;
float3 t1;
float t6;
OUT_Data_Vert vert(appdata_t in_v)
{
    OUT_Data_Vert out_v;
    out_v.vertex = UnityObjectToClipPos(in_v.vertex);
    out_v.texcoord.xy = TRANSFORM_TEX(in_v.texcoord.xy, _MainTex);
    t0.x = (in_v.normal.x * conv_mxt4x4_0(unity_WorldToObject).x);
    t0.y = (in_v.normal.x * conv_mxt4x4_1(unity_WorldToObject).x);
    t0.z = (in_v.normal.x * conv_mxt4x4_2(unity_WorldToObject).x);
    t1.x = (in_v.normal.y * conv_mxt4x4_0(unity_WorldToObject).y);
    t1.y = (in_v.normal.y * conv_mxt4x4_1(unity_WorldToObject).y);
    t1.z = (in_v.normal.y * conv_mxt4x4_2(unity_WorldToObject).y);
    t0.xyz = (t0.xyz + t1.xyz);
    t1.x = (in_v.normal.z * conv_mxt4x4_0(unity_WorldToObject).z);
    t1.y = (in_v.normal.z * conv_mxt4x4_1(unity_WorldToObject).z);
    t1.z = (in_v.normal.z * conv_mxt4x4_2(unity_WorldToObject).z);
    t0.xyz = (t0.xyz + t1.xyz);
    t0.xyz = normalize(t0.xyz);
    out_v.texcoord1.xyz = t0.xyz;
    t0.xyz = (in_v.vertex.yyy * conv_mxt4x4_1(unity_ObjectToWorld).xyz);
    t0.xyz = ((conv_mxt4x4_0(unity_ObjectToWorld).xyz * in_v.vertex.xxx) + t0.xyz);
    t0.xyz = ((conv_mxt4x4_2(unity_ObjectToWorld).xyz * in_v.vertex.zzz) + t0.xyz);
    out_v.texcoord2.xyz = ((conv_mxt4x4_3(unity_ObjectToWorld).xyz * in_v.vertex.www) + t0.xyz);
    return out_v;
}

#define CODE_BLOCK_FRAGMENT
float4 t10_0;
float3 t1_d;
float3 t16_1;
float3 t2;
float4 t16_3;
float3 t16_4;
float t6_d;
float t16_6;
float t10_6;
float3 t16_8;
float t16_11;
float t16_13;
float t16;
float t17;
float t16_18;
OUT_Data_Frag frag(v2f in_f)
{
    OUT_Data_Frag out_f;
    t10_0.x = dot(in_f.texcoord1.xyz, in_f.texcoord1.xyz);
    t10_0.x = rsqrt(t10_0.x);
    t10_0.xyz = (t10_0.xxx * in_f.texcoord1.xyz);
    t1_d.xyz = ((-in_f.texcoord2.xyz) + _WorldSpaceCameraPos.xyz);
    t16 = dot(t1_d.xyz, t1_d.xyz);
    t16 = rsqrt(t16);
    t2.xyz = ((-in_f.texcoord2.xyz) + _WorldSpaceLightPos0.xyz);
    t2.xyz = normalize(t2.xyz);
    t16_3.xyz = ((t1_d.xyz * float3(t16, t16, t16)) + t2.xyz);
    t16_18 = dot(t16_3.xyz, t16_3.xyz);
    t16_1.x = max(t16_18, 0.00100000005);
    t16_18 = rsqrt(t16_1.x);
    t16_3.xyz = (float3(t16_18, t16_18, t16_18) * t16_3.xyz);
    t16_3.w = dot(t10_0.xyz, t16_3.xyz);
    t16_3.x = dot(t2.xyz, t16_3.xyz);
    t16_3.y = dot(in_f.texcoord1.xyz, t2.xyz);
    t16_1.xyz = max(t16_3.yxw, float3(0, 0, 0));
    t16_3.x = log2(t16_1.z);
    t10_0 = tex2D(_MainTex, in_f.texcoord.xy);
    t16_8.x = ((-t10_0.w) + 1);
    t16_8.x = (t16_8.x * t16_8.x);
    t16_11 = max(t16_8.x, 9.99999975E-05);
    t16_13 = (t16_11 * t16_11);
    t16_13 = (2 / t16_13);
    t16_13 = (t16_13 + (-2));
    t16_11 = max(t16_13, 9.99999975E-05);
    t16_3.x = (t16_3.x * t16_11);
    t16_13 = (t16_11 + 1);
    t16_3.x = exp2(t16_3.x);
    t16_3.x = (t16_3.x * t16_13);
    t16_13 = (t16_1.y * t16_1.y);
    t16_8.x = ((t16_13 * t10_0.w) + t16_8.x);
    t16_8.x = (t16_8.x * 8);
    t16_6 = ((t16_8.x * t16_1.y) + 9.99999975E-05);
    t16_6 = (t16_3.x / t16_6);
    t16_6 = max(t16_6, 9.99999975E-05);
    t16_6 = sqrt(t16_6);
    t16_3.x = min(t16_6, 100);
    t16_8.xyz = (t10_0.xyz + (-unity_ColorSpaceDielectricSpec.xyz));
    t10_6 = tex2D(_MetallicTex, in_f.texcoord.xy).x;
    t16_8.xyz = ((float3(t10_6, t10_6, t10_6) * t16_8.xyz) + unity_ColorSpaceDielectricSpec.xyz);
    t16_4.x = (((-t10_6) * unity_ColorSpaceDielectricSpec.w) + unity_ColorSpaceDielectricSpec.w);
    t16_3.xyz = (t16_8.xyz * t16_3.xxx);
    t16_3.xyz = ((t10_0.xyz * t16_4.xxx) + t16_3.xyz);
    t16_4.xyz = (in_f.texcoord2.yyy * conv_mxt4x4_1(unity_WorldToLight).xyz);
    t16_4.xyz = ((conv_mxt4x4_0(unity_WorldToLight).xyz * in_f.texcoord2.xxx) + t16_4.xyz);
    t16_4.xyz = ((conv_mxt4x4_2(unity_WorldToLight).xyz * in_f.texcoord2.zzz) + t16_4.xyz);
    t16_4.xyz = (t16_4.xyz + conv_mxt4x4_3(unity_WorldToLight).xyz);
    t6_d = dot(t16_4.xyz, t16_4.xyz);
    t10_6 = tex2D(_LightTexture0, float2(t6_d, t6_d)).w;
    t16_4.xyz = (float3(t10_6, t10_6, t10_6) * _LightColor0.xyz);
    t16_3.xyz = (t16_3.xyz * t16_4.xyz);
    t16_3.xyz = (t16_1.xxx * t16_3.xyz);
    out_f.color.xyz = t16_3.xyz;
    out_f.color.w = 1;
    return out_f;
}


ENDCG

}
 Pass {
  Name "DEFERRED"
  Tags { "LIGHTMODE"="Deferred" "QUEUE"="Geometry-100" "RenderType"="Opaque" }
  GpuProgramID 132785
CGPROGRAM
//#pragma target 4.0

#pragma vertex vert
#pragma fragment frag

#include "UnityCG.cginc"
#define conv_mxt4x4_0(mat4x4) float4(mat4x4[0].x,mat4x4[1].x,mat4x4[2].x,mat4x4[3].x)
#define conv_mxt4x4_1(mat4x4) float4(mat4x4[0].y,mat4x4[1].y,mat4x4[2].y,mat4x4[3].y)
#define conv_mxt4x4_2(mat4x4) float4(mat4x4[0].z,mat4x4[1].z,mat4x4[2].z,mat4x4[3].z)
#define conv_mxt4x4_3(mat4x4) float4(mat4x4[0].w,mat4x4[1].w,mat4x4[2].w,mat4x4[3].w)


#define CODE_BLOCK_VERTEX
//uniform float4 _Time;
//uniform float4 _SinTime;
//uniform float4 _CosTime;
//uniform float4 unity_DeltaTime;
//uniform float3 _WorldSpaceCameraPos;
//uniform float4 _ProjectionParams;
//uniform float4 _ScreenParams;
//uniform float4 _ZBufferParams;
//uniform float4 unity_OrthoParams;
//uniform float4 unity_CameraWorldClipPlanes[6];
//uniform mat4x4 unity_CameraProjection;
//uniform mat4x4 unity_CameraInvProjection;
//uniform float4 _WorldSpaceLightPos0;
//uniform float4 _LightPositionRange;
//uniform float4 unity_4LightPosX0;
//uniform float4 unity_4LightPosY0;
//uniform float4 unity_4LightPosZ0;
//uniform float4 unity_4LightAtten0;
//uniform float4 unity_LightColor[8];
//uniform float4 unity_LightPosition[8];
//uniform float4 unity_LightAtten[8];
//uniform float4 unity_SpotDirection[8];
//uniform float4 unity_SHAr;
//uniform float4 unity_SHAg;
//uniform float4 unity_SHAb;
//uniform float4 unity_SHBr;
//uniform float4 unity_SHBg;
//uniform float4 unity_SHBb;
//uniform float4 unity_SHC;
uniform float3 unity_LightColor0;
uniform float3 unity_LightColor1;
uniform float3 unity_LightColor2;
uniform float3 unity_LightColor3;
uniform float4x4 unity_ShadowSplitSpheres;
uniform float4 unity_ShadowSplitSqRadii;
//uniform float4 unity_LightShadowBias;
//uniform float4 _LightSplitsNear;
//uniform float4 _LightSplitsFar;
uniform mat4x4x4 unity_WorldToShadow;
//uniform float4 _LightShadowData;
// uniform float4 unity_ShadowFadeCenterAndType;
//uniform mat4x4 UNITY_MATRIX_MVP;
//uniform mat4x4 UNITY_MATRIX_MV;
//uniform mat4x4 UNITY_MATRIX_IT_MV;
//uniform mat4x4 unity_ObjectToWorld;
uniform mat4x4 unity_WorldToObject;
//uniform float4 unity_LODFade;
//uniform float4 unity_WorldTransformParams;
//uniform mat4x4 glstate_matrix_transpose_modelview0;
//uniform mat4x4 UNITY_MATRIX_P;
//uniform float4 glstate_lightmodel_ambient;
//uniform mat4x4 unity_MatrixV;
//uniform mat4x4 unity_MatrixVP;
//uniform float4 unity_AmbientSky;
//uniform float4 unity_AmbientEquator;
//uniform float4 unity_AmbientGround;
//uniform float4 unity_FogColor;
//uniform float4 unity_FogParams;
// uniform float4 unity_LightmapST;
// uniform float4 unity_DynamicLightmapST;
//uniform float4 unity_SpecCube0_BoxMax;
//uniform float4 unity_SpecCube0_BoxMin;
//uniform float4 unity_SpecCube0_ProbePosition;
//uniform float4 unity_SpecCube0_HDR;
//uniform float4 unity_SpecCube1_BoxMax;
//uniform float4 unity_SpecCube1_BoxMin;
//uniform float4 unity_SpecCube1_ProbePosition;
//uniform float4 unity_SpecCube1_HDR;
uniform float4 unity_ColorSpaceGrey;
//uniform float4 unity_ColorSpaceDouble;
uniform float4 unity_ColorSpaceDielectricSpec;
uniform float4 unity_ColorSpaceLuminance;
//uniform float4 unity_Lightmap_HDR;
uniform float4 unity_DynamicLightmap_HDR;
uniform float4 _LightColor0;
uniform float4 _SpecColor;
uniform float4 _MainTex_ST;
uniform float4 unity_Ambient;
uniform sampler2D _MainTex;
uniform sampler2D _MetallicTex;
struct appdata_t
{
    float4 vertex :POSITION0;
    float3 normal :NORMAL0;
    float4 texcoord :TEXCOORD0;
};

struct OUT_Data_Vert
{
    float2 texcoord :TEXCOORD0;
    float3 texcoord1 :TEXCOORD1;
    float3 texcoord2 :TEXCOORD2;
    float4 texcoord4 :TEXCOORD4;
    float3 texcoord5 :TEXCOORD5;
    float4 vertex :SV_POSITION;
};

struct v2f
{
    float2 texcoord :TEXCOORD0;
    float3 texcoord1 :TEXCOORD1;
    float3 texcoord5 :TEXCOORD5;
};

struct OUT_Data_Frag
{
    float4 color :SV_Target0;
    float4 color1 :SV_Target1;
    float4 color2 :SV_Target2;
    float4 color3 :SV_Target3;
};

float4 t0;
float4 t16_0;
float3 t1;
float t16_2;
float3 t16_3;
float t12;
OUT_Data_Vert vert(appdata_t in_v)
{
    OUT_Data_Vert out_v;
    out_v.vertex = UnityObjectToClipPos(in_v.vertex);
    out_v.texcoord.xy = TRANSFORM_TEX(in_v.texcoord.xy, _MainTex);
    t0.x = (in_v.normal.x * conv_mxt4x4_0(unity_WorldToObject).x);
    t0.y = (in_v.normal.x * conv_mxt4x4_1(unity_WorldToObject).x);
    t0.z = (in_v.normal.x * conv_mxt4x4_2(unity_WorldToObject).x);
    t1.x = (in_v.normal.y * conv_mxt4x4_0(unity_WorldToObject).y);
    t1.y = (in_v.normal.y * conv_mxt4x4_1(unity_WorldToObject).y);
    t1.z = (in_v.normal.y * conv_mxt4x4_2(unity_WorldToObject).y);
    t0.xyz = (t0.xyz + t1.xyz);
    t1.x = (in_v.normal.z * conv_mxt4x4_0(unity_WorldToObject).z);
    t1.y = (in_v.normal.z * conv_mxt4x4_1(unity_WorldToObject).z);
    t1.z = (in_v.normal.z * conv_mxt4x4_2(unity_WorldToObject).z);
    t0.xyz = (t0.xyz + t1.xyz);
    t0.xyz = normalize(t0.xyz);
    out_v.texcoord1.xyz = t0.xyz;
    t1.xyz = (in_v.vertex.yyy * conv_mxt4x4_1(unity_ObjectToWorld).xyz);
    t1.xyz = ((conv_mxt4x4_0(unity_ObjectToWorld).xyz * in_v.vertex.xxx) + t1.xyz);
    t1.xyz = ((conv_mxt4x4_2(unity_ObjectToWorld).xyz * in_v.vertex.zzz) + t1.xyz);
    out_v.texcoord2.xyz = ((conv_mxt4x4_3(unity_ObjectToWorld).xyz * in_v.vertex.www) + t1.xyz);
    out_v.texcoord4 = float4(0, 0, 0, 0);
    t16_2 = (t0.y * t0.y);
    t16_2 = ((t0.x * t0.x) + (-t16_2));
    t16_0 = (t0.yzzx * t0.xyzz);
    t16_3.x = dot(unity_SHBr, t16_0);
    t16_3.y = dot(unity_SHBg, t16_0);
    t16_3.z = dot(unity_SHBb, t16_0);
    out_v.texcoord5.xyz = ((unity_SHC.xyz * float3(t16_2, t16_2, t16_2)) + t16_3.xyz);
    return out_v;
}

#define CODE_BLOCK_FRAGMENT
float4 t16_0_d;
float t10_0;
float3 t16_1;
float3 t16_2_d;
float4 t10_2;
float3 t16_3_d;
float3 t10_4;
OUT_Data_Frag frag(v2f in_f)
{
    OUT_Data_Frag out_f;
    out_f.color.w = 1;
    t10_0 = tex2D(_MetallicTex, in_f.texcoord.xy).x;
    t16_1.x = (((-t10_0) * unity_ColorSpaceDielectricSpec.w) + unity_ColorSpaceDielectricSpec.w);
    t10_2 = tex2D(_MainTex, in_f.texcoord.xy);
    t16_1.xyz = (t16_1.xxx * t10_2.xyz);
    out_f.color.xyz = t16_1.xyz;
    t16_3_d.xyz = (t10_2.xyz + (-unity_ColorSpaceDielectricSpec.xyz));
    out_f.color1.w = t10_2.w;
    out_f.color1.xyz = ((float3(t10_0, t10_0, t10_0) * t16_3_d.xyz) + unity_ColorSpaceDielectricSpec.xyz);
    t10_4.xyz = ((in_f.texcoord1.xyz * float3(0.5, 0.5, 0.5)) + float3(0.5, 0.5, 0.5));
    out_f.color2.xyz = t10_4.xyz;
    out_f.color2.w = 1;
    t16_0_d.xyz = in_f.texcoord1.xyz;
    t16_0_d.w = 1;
    t16_3_d.x = dot(unity_SHAr, t16_0_d);
    t16_3_d.y = dot(unity_SHAg, t16_0_d);
    t16_3_d.z = dot(unity_SHAb, t16_0_d);
    t16_3_d.xyz = (t16_3_d.xyz + in_f.texcoord5.xyz);
    t16_3_d.xyz = max(t16_3_d.xyz, float3(0, 0, 0));
    t16_2_d.xyz = log2(t16_3_d.xyz);
    t16_2_d.xyz = (t16_2_d.xyz * float3(0.416666657, 0.416666657, 0.416666657));
    t16_2_d.xyz = exp2(t16_2_d.xyz);
    t16_2_d.xyz = ((t16_2_d.xyz * float3(1.05499995, 1.05499995, 1.05499995)) + float3(-0.0549999997, (-0.0549999997), (-0.0549999997)));
    t16_2_d.xyz = max(t16_2_d.xyz, float3(0, 0, 0));
    t16_1.xyz = (t16_1.xyz * t16_2_d.xyz);
    out_f.color3.xyz = exp2((-t16_1.xyz));
    out_f.color3.w = 1;
    return out_f;
}


ENDCG

}
}
Fallback "Diffuse"
}